package com.ruoyi.sys.personnel.service.Impl;


import com.ruoyi.common.core.domain.R;
import com.ruoyi.sys.personnel.entity.TbVisitingRecords;
import com.ruoyi.sys.personnel.mapper.TbVisitingRecordsMapper;
import com.ruoyi.sys.personnel.service.TbVisitingRecordsService;
import com.ruoyi.sys.personnel.vo.TbVisitingRecordsVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TbVisitingRecordsServiceImpl  implements TbVisitingRecordsService {
    @Resource
    private TbVisitingRecordsMapper tbvrMapper;
    R  r = new R();
    /**
     * 查所有
     * @param vo
     * @return
     */
    @Override
    public R getAll(TbVisitingRecordsVO vo) {
        List<TbVisitingRecords> all = tbvrMapper.getAll(vo);

        if (all!= null) {
            r.setCode(0);

            r.setData(all);
            r.setMsg("查询成功");
        }else{
            r.setCode(-1);
        }

        return r;
    }
}
